OGLX notebook 4
hnxj@github
Load toolboxes
clear;clc;close
all
;
cd(
'D:\Electrophysiology\Matdelane\'
);
addpath(genpath(
'matnwb'
));
addpath(genpath(
'matdelane'
));
addpath(genpath(
'flipv2'
));
generateCore();
addpath(
'fieldtrip'
);ft_defaults;
nwbPath =
"data\"
;
nwbFiles = {dir(nwbPath).name};
nwbFiles = nwbFiles(endsWith(nwbFiles,
".nwb"
));
disp(
"Toolbox setup done."
);
Toolbox setup done.
nwbFile = nwbPath + nwbFiles{6};
nwb = nwbRead(nwbFile);
disp(
"Loaded"
+ nwbFile);
Loadeddata\sub-C31o_ses-230830.nwb
disp(
"Probe N = "
+ num2str(length(nwb.general_extracellular_ephys.values())));
Probe N = 3
chrsp1 = jReceptiveFieldMap(nwb, 1);
-> 3 Probes detected in sub-C31o_ses-230830 -->This function will process only probe no.1 (PFC)
chrsp2 = jReceptiveFieldMap(nwb, 2);
-> 3 Probes detected in sub-C31o_ses-230830 -->This function will process only probe no.2 (V4, MT)
chrsp3 = jReceptiveFieldMap(nwb, 3);
-> 3 Probes detected in sub-C31o_ses-230830 -->This function will process only probe no.3 (V1, V3)
[pinfo, xa] = jNWBSignals(nwb, 0,
"flash"
, 500, 500,
"lfp"
);
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): PFC _
data = xa{1};chmp = 1:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :),
'DataType'
,
'raw_cut'
,
'fsample'
, 1000,
'intdist'
, 0.04,
'plot_result'
, true);
[pinfo, xa] = jNWBSignals(nwb, 1,
"flash"
, 500, 500,
"lfp"
);
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): V4, MT _
data = xa{1};chmp = 1:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :),
'DataType'
,
'raw_cut'
,
'fsample'
, 1000,
'intdist'
, 0.04,
'plot_result'
, true);
[pinfo, xa] = jNWBSignals(nwb, 2,
"flash"
, 500, 500,
"lfp"
);
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): V1, V3 _
data = xa{1};chmp = 1:64;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :),
'DataType'
,
'raw_cut'
,
'fsample'
, 1000,
'intdist'
, 0.04,
'plot_result'
, true);
[pinfo, xa] = jNWBSignals(nwb, 2,
"flash"
, 500, 500,
"lfp"
);
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): V1, V3 _
data = xa{1};chmp = 65:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :),
'DataType'
,
'raw_cut'
,
'fsample'
, 1000,
'intdist'
, 0.04,
'plot_result'
, true);